<title>产品分类列表</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>产品列表</cite></a>
    </div>
</div>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">

            <!-- 搜索表单 -->
            <div class="layui-form" lay-filter="LAY-home-products-search-form" id="LAY-home-products-search-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <div class="layui-input-block">
                            <button class="layui-btn layuiadmin-btn-list" data-type="add">添加</button>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">产品名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="keywords" placeholder="请输入产品名称关键词" lay-affix="clear" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">产品分类</label>
                        <div class="layui-input-inline">
                            <input type="hidden" id="catId" name="cat_id" class="layui-input">
                            <button class="layui-btn layui-btn-primary" id="dropdown-type">
                                <span>全部</span>
                                <i class="layui-icon layui-icon-down layui-font-12"></i>
                            </button>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <div class="layui-input-inline">
                            <button class="layui-btn" lay-submit lay-filter="LAY-home-products-search-form-submit">搜索</button>
                        </div>
                    </div>
                </div>
            </div>


            <table id="LAY-home-product-list" lay-filter="LAY-home-product-list"></table>
            <script type="text/html" id="LAY-home-product-tools">
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="copy"><i
                        class="layui-icon layui-icon-edit"></i>复制</a>
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i
                        class="layui-icon layui-icon-edit"></i>编辑</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i
                        class="layui-icon layui-icon-delete"></i>删除</a>
            </script>
        </div>
    </div>
</div>

<script type="text/html" id="ID-table-product-is_show-switch">
  <!-- 这里的 checked 的状态值判断仅作为演示 -->
  <input type="checkbox" name="is_show" value="{{= d.product_id }}" title="是|否" lay-skin="switch" lay-filter="product-is_show-status" {{= d.is_show == 1 ? "checked" : "" }}>
</script>


<script type="text/html" id="ID-table-product-is_hot-switch">
  <!-- 这里的 checked 的状态值判断仅作为演示 -->
  <input type="checkbox" name="is_hot" value="{{= d.product_id }}" title="是|否" lay-skin="switch" lay-filter="product-is_hot-status" {{= d.is_hot == 1 ? "checked" : "" }}>
</script>

<script type="text/html" id="TPL-dropdown-productCategory">
  <button class="layui-btn layui-btn-primary dropdown-demo">
      {{# if(d.productCategory){ }}
        <span>{{= d.productCategory.name }}</span>
      {{# }else{ }}
        <span>无</span>
      {{# } }}
    <i class="layui-icon layui-icon-down layui-font-12"></i>
  </button>
</script>

<script src="res/modules/product.js"></script>
